package beauty;


public class B1_1 {

	/**
	 * @param args
	 * @throws InterruptedException
	 */
	public static void main(String[] args) throws InterruptedException {
		int interval = 50;
		int count = 200;
		double[] busy = new double[count];
		double[] idle = new double[count];

		int half = interval / 2;
		double w = 0;
		for (int i = 0; i < count; i++) {
			busy[i] = half + half * Math.sin(w);
			w = w + 2 * Math.PI / count;
			idle[i] = interval - busy[i];
		}

		long startTime = 0;
		int j = 0;
		while (true) {
			startTime = System.currentTimeMillis();
			j = j % count;
			System.out.println(busy[j]);
			// busy loop
			while ((System.currentTimeMillis() - startTime) <= busy[j])
				;
			// idle loop
			try {
				Thread.sleep((int) idle[j]);
			} catch (InterruptedException e) {
				System.out.println(e);
			}
			j++;
		}

	}
}
